package kr.ac.kaist.idb.xstream;

import com.thoughtworks.xstream.XStream;
import com.thoughtworks.xstream.converters.reflection.FieldDictionary;
import com.thoughtworks.xstream.converters.reflection.ImmutableFieldKeySorter;
import com.thoughtworks.xstream.converters.reflection.Sun14ReflectionProvider;
import com.thoughtworks.xstream.io.xml.DomDriver;

public class ObjectPrinter {
	public static void printObject(Object object)
	{
		XStream xStream = new XStream(
				new Sun14ReflectionProvider(
						new FieldDictionary(new ImmutableFieldKeySorter())), 
						new DomDriver("utf-8"));

		System.out.println(xStream.toXML(object));
	}
}
